﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using weiqijiance.model.安检联网;

namespace weiqijiance.安检联网
{
    public class meizhouclass : ajlwbass
    {
//        public override string SendJYXMKSSJ(string jyxm, string sbz, string gwjysbbh, string tongdao, model.安检联网.carclass objmodel)//检测项目开始和结束
//        {
//            if (!ssfAJLW.Contains("是"))
//            {
//                return "1";
//            }
//            string sksjs = "kssj";
//            string sjyxx18c55 = "18C55";
//            if (sbz.Contains("开始"))
//            {
//                sksjs = "kssj";
//                luxiangkais(objmodel.jylsh, tongdao, jyxm, objmodel);//18C55录像开始
//            }
//            else if (sbz.Contains("结束"))
//            {
//                sksjs = "jssj";
//                sjyxx18c55 = "18C58";
//                luxiangjieshu(objmodel.jylsh, tongdao, jyxm, objmodel);//18C58录像结束
//            }
//            string s18C55 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
//			            <vehispara>
//			            <jylsh>{0}</jylsh>
//			            <jyjgbh>{1}</jyjgbh>
//			            <jcxdh>{2}</jcxdh>
//                        <jycs>{3}</jycs>
//                        <hpzl>{4}</hpzl>
//                        <hphm>{5}</hphm>			            
//                        <clsbdh>{6}</clsbdh>
//			            <gwjysbbh>{7}</gwjysbbh>
//			            <jyxm>{8}</jyxm>
//			            <{10}>{9}</{11}>
//			            </vehispara>
//			            </root>",
//                       objmodel.jylsh,
//                       jyjgbh,
//                       objmodel.jcxdh,
//                       objmodel.jycs,
//                       objmodel.hpzl.Substring(0, 2),
//                       encode(objmodel.hphm),
//                       objmodel.clsbdh,
//                       "",
//                       jyxm,
//                       DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
//                       sksjs,
//                       sksjs);

//            WebReferenceAJ.Service objweb = new WebReferenceAJ.Service();
//            objweb.Url = sweb;
//            return objweb.writeObjectOut("18", ssqm, sjyxx18c55, s18C55);
//        }
        public override string sendpic(string tongdao, string gongwei, model.安检联网.carclass objmodel)//抓拍指令
        {
            if (gongwei.Contains("zdgw") || gongwei.Contains("dggw") || gongwei.Contains("dlx") || gongwei.Contains("DP"))
            {
                base.sendpic(tongdao, gongwei, objmodel);
            }
            return "";
        }
        //public override string luxiangkais(string jylsh, string tongdao, string gongwei, model.安检联网.carclass objmodel)//抓拍指令
        //{
        //    string strSql = "";
        //    strSql += ("insert into SendZP(");
        //    strSql += ("lsh,hphm,hpzl,jczbh,jcxhm,jcgwh,ml,shifou");
        //    strSql += (")");
        //    strSql += (" values (");
        //    strSql += ("'" + jylsh + "',");
        //    strSql += ("'" + objmodel.hphm + "',");
        //    strSql += ("'" + objmodel.hpzl + "',");
        //    strSql += ("'" + objmodel.jyjgbh + "',");
        //    strSql += ("'" + objmodel.jcxdh + "',");
        //    strSql += ("'" + gongwei + "',");
        //    strSql += ("'start',");
        //    strSql += ("'" + "否" + "'");
        //    strSql += (")");
        //    m_mainform.objdbbass.InsertDB(strSql);

        //    return "1";
        //}
        //public override string luxiangjieshu(string jylsh, string tongdao, string gongwei, model.安检联网.carclass objmodel)//抓拍指令
        //{
        //    string strSql = "";
        //    strSql += ("insert into SendZP(");
        //    strSql += ("lsh,hphm,hpzl,jczbh,jcxhm,jcgwh,ml,shifou");
        //    strSql += (")");
        //    strSql += (" values (");
        //    strSql += ("'" + jylsh + "',");
        //    strSql += ("'" + objmodel.hphm + "',");
        //    strSql += ("'" + objmodel.hpzl + "',");
        //    strSql += ("'" + objmodel.jyjgbh + "',");
        //    strSql += ("'" + objmodel.jcxdh + "',");
        //    strSql += ("'" + gongwei + "',");
        //    strSql += ("'end',");
        //    strSql += ("'" + "否" + "'");
        //    strSql += (")");
        //    m_mainform.objdbbass.InsertDB(strSql);
        //    return "1";

        //}

        public override string writeObjectOut(string jkid, string WriteXmlDoc)
        {
            if (!ssfAJLW.Contains("是"))
            {
                return "1";
            }
            WebReferenceAJ.Service objweb = new WebReferenceAJ.Service();
            objweb.Url = sweb;
            string msg = objweb.writeObjectOut("18", ssqm, jkid, WriteXmlDoc);
            if (msg.Contains("<code>1</code>"))
            {
                return "1";
            }
            return msg;
        }
        public override string SendJYXMKSSJ(string jyxm, string sbz, string gwjysbbh, string tongdao, model.安检联网.carclass objmodel)//检测项目开始和结束
        {
            if (!ssfAJLW.Contains("是"))
            {
                return "1";
            }
            if (jyxm.Contains("B0") && (sbz.Contains("拍照") || sbz.Contains("录像")))
            {
                return "1";
            }
            if (jyxm.Contains("WE"))
            {
                return "1";
            }
            string sksjs = "kssj";
            string sjyxx18c55 = "18C55";
            string spblx = "";
            //if (jyxm != "B0")
            {
                if (sbz == ("开始"))
                {
                    sksjs = "kssj";
                    luxiangkais(objmodel.jylsh, tongdao, jyxm, objmodel);//18C55录像开始
                }
                else if (sbz == ("结束"))
                {
                    sksjs = "jssj";
                    sjyxx18c55 = "18C58";
                    luxiangjieshu(objmodel.jylsh, tongdao, jyxm, objmodel);//18C58录像结束
                }
            }
            if (jyxm == ("B0Q"))
            {
                jyxm = "B0";
            }
            if (jyxm == ("B0H"))
            {
                return "1";
            }
            if (jyxm == ("PBB1"))
            {
                jyxm = "B1";
            }
            if (jyxm == ("PBB2"))
            {
                jyxm = "B2";
            }

            string s18C55 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
			            <vehispara>
			            <jylsh>{0}</jylsh>
			            <jyjgbh>{1}</jyjgbh>
			            <jcxdh>{2}</jcxdh>
                        <jycs>{3}</jycs>
                        <hpzl>{4}</hpzl>
                        <hphm>{5}</hphm>			            
                        <clsbdh>{6}</clsbdh>
			            <gwjysbbh>{7}</gwjysbbh>
			            <jyxm>{8}</jyxm>
			            <{10}>{9}</{11}>
			            </vehispara>
			            </root>",
                       objmodel.jylsh,
                       jyjgbh,
                       objmodel.jcxdh,
                       objmodel.jycs,
                       objmodel.hpzl.Substring(0, 2),
                       encode(objmodel.hphm),
                       objmodel.clsbdh,
                       "",
                       jyxm,
                       DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
                       sksjs,
                       sksjs);

            WebReferenceAJ.Service objweb = new WebReferenceAJ.Service();
            objweb.Url = sweb;

            string msg = objweb.writeObjectOut("18", ssqm, sjyxx18c55, s18C55);
            if (msg.Contains("<code>1</code>"))
            {
                return "1";
            }
            return msg;
        }


        public override string write(carclass objmodel, modelA1 objbass)
        {
            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
						<chz>{5}</chz>
						<chpd>{6}</chpd>
                        <chz2>{7}</chz2>
                        <chpd2>{8}</chpd2>
						</vehispara>
						</root>",
                          objmodel.jylsh,
                          jyjgbh,
                          objmodel.jcxdh,
                          "A1",
                          objmodel.jycs,
                          objbass.chz,
                          objbass.chpd,
                          objbass.chz2,
                          objbass.chpd2);
            //数据上传
            return writeObjectOut("18C81", s18C81);
            //return "";
        }

        public override string write(carclass objmodel, modelC1 objbass)
        {
            string s18C80 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jycs>{3}</jycs>
                        <jyxm>{4}</jyxm>						
                        <hpzl>{5}</hpzl>
                        <hphm>{6}</hphm>
                        <clsbdh>{7}</clsbdh>
                        <rzxxbj>{8}</rzxxbj>
                        <rcdxbj>{9}</rcdxbj>
                        <rxsxbj>{10}</rxsxbj>
                        <rzdxbj>{11}</rzdxbj>
                        <rqtbj>{12}</rqtbj>
                        <jyyjy>{13}</jyyjy>
                        <dpjcjyy>{14}</dpjcjyy>
                        <dpjyysfzh>{15}</dpjyysfzh>
                        <ycy>{16}</ycy>
                        <ycysfzh>{17}</ycysfzh>
                        <ycyjy>{18}</ycyjy>
                        <bz>{19}</bz>
                        <ycy>{20}</ycy>
                        <ycysfzh>{21}</ycysfzh>
						</vehispara>
						</root>",
                          objmodel.jylsh,
                          jyjgbh,
                          objmodel.jcxdh,
                          objmodel.jycs,
                          "C1",
                          objmodel.hpzl.Substring(0, 2),
                          objmodel.hphm,
                          objmodel.clsbdh,
                          objbass.rzxxbj,
                          objbass.rcdxbj,
                          objbass.rxsxbj,
                          objbass.rzdxbj,
                          objbass.rqtbj,
                          "",
                          "1",
                          "445121",
                          "1",
                          "445121",
                          objbass.ycyjy,
                          objbass.bz,
                          encode(objbass.ycy),
                          objbass.ycysfzh);
            //数据上传
            return writeObjectOut("18C80", s18C80);
            //return "";
        }

        public override string write(carclass objmodel, modelB objbass, int ivax)
        {
            //安检数据检测数据上传
            string[] zlz = { "yzzlz", "ezzlz", "sanzzlz", "sizzlz", "wzzlz" };//一轴左静态轮荷
            string[] ylz = { "yzylz", "ezylz", "sanzylz", "sizylz", "wzylz" };//一轴右静态轮荷
            string[] kzzh = { "yzkzzh", "ezkzzh", "sanzkzzh", "sizkzzh", "wzkzzh" };//一轴空载轴荷
            string[] qhzzdl = { "yzqhzzdl", "ezqhzzdl", "sanzqhzzdl", "sizqhzzdl", "wzqhzzdl" };//一轴最大左行车制动力值
            string[] qhyzdl = { "yzqhyzdl", "ezqhyzdl", "sanzqhyzdl", "sizqhyzdl", "wzqhyzdl" };//一轴最大右行车制动力值
            string[] qczzdl = { "yzqczzdl", "ezqczzdl", "sanzqczzdl", "sizqczzdl", "wzqczzdl" };//一轴最大左制动力差值

            string[] qcyzdl = { "yqqcyzdl", "ezqcyzdl", "sanzqcyzdl", "sizqcyzdl", "wzqcyzdl" };//最大右制动力差值
            string[] dll = { "yzdll", "ezdll", "sanzdll", "sizdll", "wzdll" };//行车制动率
            string[] zdlpd = { "yzzdlpd", "ezzdlpd", "sanzzdlpd", "sizzdlpd", "wzzdlpd" };//行车制动率判定
            string[] bphl = { "yzbphl", "ezbphl", "sanzbphl", "sizbphl", "wzbphl" };//不平衡率
            string[] bphlpd = { "yzbphlpd", "ezbphlpd", "sanzbphlpd", "sizbphlpd", "wzbphlpd" };//不平衡率判定
            string[] zdpd = { "yzzdpd", "ezzdpd", "sanzzdpd", "sizzdpd", "wzzdpd" };//制动判定
            string[] zldtlh = { "yzzldtlh", "ezzldtlh", "sanzzldtlh", "sizzldtlh", "wzzldtlh" };//左轮动态轮荷
            string[] yldtlh = { "yzyldtlh", "ezyldtlh", "sanzyldtlh", "sizyldtlh", "wzyldtlh" };//右轮动态轮荷
            string[] zdlqx = { "yzzdlqx", "ezzdlqx", "sanzzdlqx", "sizzdlqx", "wzzdlqx" };//制动力曲线

            string[] zlsfbs = { "yzzlsfbs", "ezzlsfbs", "sanzzlsfbs", "sizzlsfbs", "wzzlsfbs" };//左轮是否抱死

            string[] ylsfbs = { "yzylsfbs", "ezylsfbs", "sanzylsfbs", "sizylsfbs", "wzylsfbs" };//右轮是否抱死


            string jyxm = "";
            string sclcsd = "";

            if (ivax == 0) { jyxm = "B1"; sclcsd = string.Format("<clcsd>{0}</clcsd>", objbass.clcsd); }
            if (ivax == 1) { jyxm = "B2"; sclcsd = string.Format("<clcsd>{0}</clcsd>", objbass.clcsd); }
            if (ivax == 2) { jyxm = "B3"; }
            if (ivax == 3) { jyxm = "B4"; }
            if (ivax == 4) { jyxm = "B5"; }
            //if (ivax == 5) jyxm = "B6";

            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
						<{20}>{5}</{20}>
						<{21}>{6}</{21}>
                        <{22}>{7}</{22}>
                        <{23}>{8}</{23}>
                        <{24}>{9}</{24}>
                        <{25}>{10}</{25}>
                        <{26}>{11}</{26}>
                        <{27}>{12}</{27}>
                        <{28}>{13}</{28}>
                        <{29}>{14}</{29}>
                        <{30}>{15}</{30}>
                        <{31}>{16}</{31}>
                        <{32}>{17}</{32}>
                        <{33}>{18}</{33}>
                        <{34}>{19}</{34}>
                        {35}
                        <{36}>{38}</{36}>
                        <{37}>{39}</{37}>
						</vehispara>
						</root>",
                          objmodel.jylsh,
                          jyjgbh,
                          objmodel.jcxdh,
                          jyxm,
                          objmodel.jycs,
                          objbass.zlz,
         objbass.ylz,
         objbass.kzzh,
         objbass.qhzzdl,
         objbass.qhyzdl,
         objbass.qczzdl,
         objbass.qcyzdl,
         objbass.dll,
         objbass.zdlpd,
         objbass.bphl,
         objbass.bphlpd,
         objbass.zdpd,
         objbass.zldtlh,
         objbass.yldtlh,
         objbass.zdlqx,
                          zlz[ivax],
                          ylz[ivax],
                          kzzh[ivax],
                          qhzzdl[ivax],
                          qhyzdl[ivax],
                          qczzdl[ivax],
                          qcyzdl[ivax],
                          dll[ivax],
                          zdlpd[ivax],
                          bphl[ivax],
                          bphlpd[ivax],
                          zdpd[ivax],
                          zldtlh[ivax],
                          yldtlh[ivax],
                          zdlqx[ivax],
                          sclcsd,
                          zlsfbs[ivax],
                          ylsfbs[ivax],
                          objbass.zlsfbs,
                          objbass.ylsfbs);
            //数据上传
            //writeObjectOut("18C81", s18C81);
            return writeObjectOut("18C81", s18C81);
            //return "";
        }

        public override string write(carclass objmodel, modelB0 objbass)
        {
            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
						<yzzczdl>{5}</yzzczdl>
						<ezzczdl>{6}</ezzczdl>
                        <sanzzczdl>{7}</sanzzczdl>
                        <sizzczdl>{8}</sizzczdl>
                        <wzzczdl>{9}</wzzczdl>
                        <zczczdl>{10}</zczczdl>
                        <tczzdl>{11}</tczzdl>
                        <tcyzdl>{12}</tcyzdl>
                        <tczdl>{13}</tczdl>
                        <tczdpd>{14}</tczdpd>
						</vehispara>
						</root>",
                    objmodel.jylsh,
                    jyjgbh,
                    objmodel.jcxdh,
                    "B0",
                    objmodel.jycs,
                    objbass.yzzczdl,
                    objbass.ezzczdl,
                    objbass.sanzzczdl,
                    objbass.sizzczdl,
                    objbass.wzzczdl,
                    objbass.zczczdl,
                    objbass.tczzdl,
                    objbass.tcyzdl,
                    objbass.tczdl,
                    objbass.tczdpd);
            //数据上传
            //writeObjectOut("18C81", s18C81);
            return writeObjectOut("18C81", s18C81);
            //return "";
        }

        public override string write(carclass objmodel, modelL objbass, int ivax)
        {
            string jyxm = "";
            if (ivax == 0) jyxm = "L1";
            if (ivax == 1) jyxm = "L2";
            if (ivax == 2) jyxm = "L3";
            if (ivax == 3) jyxm = "L4";
            if (ivax == 4) jyxm = "L5";

            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
						<qhzzdl>{5}</qhzzdl>
						<qhyzdl>{6}</qhyzdl>
                        <qczzdl>{7}</qczzdl>
                        <qcyzdl>{8}</qcyzdl>
                        <dll>{9}</dll>
                        <zdlpd>{10}</zdlpd>
                        <bphl>{11}</bphl>
                        <bphlpd>{12}</bphlpd>
                        <zdpd>{13}</zdpd>
                        <zdlqx>{14}</zdlqx>
                        <jzzh>{15}</jzzh>
                        <zlsfbs>{16}</zlsfbs>
                        <ylsfbs>{17}</ylsfbs>
						</vehispara>
						</root>",
                          objmodel.jylsh,
                          jyjgbh,
                          objmodel.jcxdh,
                          jyxm,
                          objmodel.jycs,
                        objbass.qhzzdl,
                        objbass.qhyzdl,
                        objbass.qczzdl,
                        objbass.qcyzdl,
                        objbass.dll,
                        objbass.zdlpd,
                        objbass.bphl,
                        objbass.bphlpd,
                        objbass.zdpd,
                        objbass.zdlqx,
                        objbass.jzzh,
                        objbass.zlsfbs,
                        objbass.ylsfbs
                        );
            //objbass.zljzlh,
            //objbass.yljzlh,
            return writeObjectOut("18C81", s18C81);
            //return "";
        }

        public override string write(carclass objmodel, modelH1 objbass)
        {
            //左主灯
            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
                        <zwygqd>{5}</zwygqd>
                        <zwdpd>{6}</zwdpd>
						</vehispara>
						</root>",
                        objmodel.jylsh,
                        jyjgbh,
                        objmodel.jcxdh,
                        "H1",
                        objmodel.jycs,
                        objbass.zwygqd,
                        objbass.zwdpd);
            string msg = writeObjectOut("18C81", s18C81);
            if (msg.Contains("<code>1</code>"))
            {
                msg = "1";
            }
            return msg;
            //return "";
        }

        public override string write(carclass objmodel, modelH4 objbass)
        {
            //右主灯
            string s18C81 = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
						<vehispara>
						<jylsh>{0}</jylsh>
						<jyjgbh>{1}</jyjgbh>
						<jcxdh>{2}</jcxdh>
                        <jyxm>{3}</jyxm>
						<jycs>{4}</jycs>
                        <ywygqd>{5}</ywygqd>
                        <ywdpd>{6}</ywdpd>
						</vehispara>
						</root>",
                        objmodel.jylsh,
                        jyjgbh,
                        objmodel.jcxdh,
                        "H4",
                        objmodel.jycs,
                        objbass.ywygqd,
                        objbass.ywdpd);
            return writeObjectOut("18C81", s18C81);
            //return "";
        }

        public override string write(carclass objmodel, modelZ1 objbass)
        {
            string QueryXmlDoc = "";
            string stou = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
            QueryXmlDoc = stou + string.Format(@"<root>
                                                <vehispara>
                                                <jylsh>{0}</jylsh>
                                                <jyjgbh>{1}</jyjgbh>
                                                <jcxdh>{2}</jcxdh>
                                                <jyxm>{3}</jyxm>
                                                <jycs>{4}</jycs>
                                                <zbzl>{5}</zbzl>                                              
                                                <clzl>{6}</clzl>
                                                <wbzl>{7}</wbzl>
                                                <qtbjzl>{8}</qtbjzl>
                                                <qtbjsm>{9}</qtbjsm>
                                                <bzzczbzl>{10}</bzzczbzl>
                                                <zczbzlbfb>{11}</zczbzlbfb>
                                                <zbzlpd>{12}</zbzlpd>
                                                </vehispara>
                                                </root>",
                                                objmodel.jylsh,
                                                objmodel.jyjgbh,
                                                objmodel.jcxdh,
                                                "Z1",
                                                objmodel.jycs,
                                                objbass.zbzl,
                                                objbass.clzl,
                                                objbass.wbzl,
                                                objbass.qtbjzl,
                                                objbass.qtbjsm,
                                                objbass.bzzczbzl,
                                                objbass.zczbzlbfb,
                                                objbass.zbzlpd);
            return writeObjectOut("18C81", QueryXmlDoc);
        }
        public override string write(carclass objmodel, modelM1 objbass)
        {
            string WriteXmlDoc = string.Format("<?xml version=\"1.0\" encoding=\"GBK\"?>" + @"<root>
			<vehispara>
			<jylsh>{0}</jylsh>
			<jyjgbh>{1}</jyjgbh>
			<jcxdh>{2}</jcxdh>
			<jyxm>{3}</jyxm>
			<jycs>{4}</jycs>
            <cwkc>{5}</cwkc>
            <cwkk>{6}</cwkk>
            <cwkg>{7}</cwkg> 
            <sfjsb>{8}</sfjsb>
            <cwkcrgfc>{9}</cwkcrgfc>
            <cwkkrgfc>{10}</cwkkrgfc>
            <cwkgrgfc>{11}</cwkgrgfc>
            <clwkccpd>{12}</clwkccpd>
			</vehispara>
			</root>", objmodel.jylsh, objmodel.jyjgbh, objmodel.jcxdh, "M1", objmodel.jycs,
            objbass.cwkc, objbass.cwkk, objbass.cwkg,
            objbass.sfjsb,
            objbass.cwkcrgfc,
            objbass.cwkkrgfc,
            objbass.cwkgrgfc,
             objbass.clwkccpd);
            return writeObjectOut("18C81", WriteXmlDoc);

        }

        public override string write(carclass objmodel, model18C82 model18C82)
        {
            string vehispara18C82 = "";
            string stoubao18C82 = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
            vehispara18C82 = stoubao18C82 + string.Format(@"<root><vehispara>
                            <jylsh>{0}</jylsh>
                            <jyjgbh>{1}</jyjgbh>
                            <jcxdh>{2}</jcxdh>
                            <hphm>{3}</hphm>
                            <hpzl>{4}</hpzl>
                            <clsbdh>{5}</clsbdh>
                            <ycyxm>{6}</ycyxm>
                            <ycysfzh>{7}</ycysfzh>
                            <zczdl>{8}</zczdl>
                            <zczdpd>{9}</zczdpd>
                            <zchphm>{10}</zchphm>
                            <zczqyzzl>{11}</zczqyzzl>
                             <zczdjyjg>{12}</zczdjyjg>
                             <zdjccs>{13}</zdjccs>
                            <zcpd>{14}</zcpd>
                            <zjccs>{15}</zjccs>
                            <bz>{16}</bz>
                            </vehispara></root>",
                       objmodel.jylsh,
                       jyjgbh,
                       objmodel.jcxdh,
                       objmodel.hphm,
                       m_mainform.encode(objmodel.hpzl.Substring(0, 2)),
                       m_mainform.encode(objmodel.clsbdh),
                       model18C82.ycyxm,
                       "445281199501013034",//身份证
                       model18C82.zczdl,//整车制动率
                       model18C82.zczdpd,//整车制动判定
                       model18C82.zchphm,
                       model18C82.zczqyzzl,
                        "0",//主车制动检验结果
                       model18C82.zdjccs,//整车制动次数
                       model18C82.zcpd,//整车判定
                       model18C82.zjccs,//总检验次数
                       model18C82.bz
                       );//整备质量判定
            return writeObjectOut("18C82", vehispara18C82);
        }

        public override string write(carclass objmodel, model18C62 model18C62)
        {
            string vehispara18C62 = "";
            string stoubao18C62 = "<?xml version=\"1.0\" encoding=\"GBK\"?>";
            vehispara18C62 = stoubao18C62 + string.Format(@"<root><vehispara>
                            <jylsh>{0}</jylsh>
                            <jyjgbh>{1}</jyjgbh>
                            <jcxdh>{2}</jcxdh>
                            <jycs>{3}</jycs>
                            <hphm>{4}</hphm>
                            <hpzl>{5}</hpzl>
                            <clsbdh>{6}</clsbdh>
                            <jyjl>{7}</jyjl>
                            <pzrxm>{8}</pzrxm>
                            <rgjyjgs>{9}</rgjyjgs>
                            <yqsbjyjgs>{10}</yqsbjyjgs>
                            <jybgjy>{11}</jybgjy>
                            <jybgbz>{12}</jybgbz>
                            </vehispara></root>",
                   objmodel.jylsh,
                   objmodel.jyjgbh,
                   objmodel.jcxdh,
                   objmodel.jycs,
                   m_mainform.encode(objmodel.hphm),
                   m_mainform.encode(objmodel.hpzl.Substring(0, 2)),
                   m_mainform.encode(objmodel.clsbdh),
                   m_mainform.encode(model18C62.jyjl),
                   m_mainform.encode(model18C62.pzrxm),//问题
                   model18C62.rgjyjgs,
                   model18C62.yqsbjyjgs,
                   model18C62.jybgjy,
                   model18C62.jybgbz);
            return writeObjectOut("18C62", vehispara18C62);
        }

       
    }
}
